#
# Try to find FreeImage library and include path.
# Once done this will define
#
# OPENGL_FOUND
# OPENGL_INCLUDE_PATH
# OPENGL_LIBRARY
#

FIND_PATH( OPENGL_INCLUDE_PATH GL/gl.h
	/usr/include
	/usr/local/include
	/sw/include
	/opt/local/include
	DOC "The directory where GL/gl.h resides")
FIND_LIBRARY( OPENGL_LIBRARY
	NAMES GL
	PATHS
	/usr/lib64
	/usr/lib
	/usr/local/lib64
	/usr/local/lib
	/sw/lib
	/opt/local/lib
	DOC "The OpenGL library")


IF (OPENGL_INCLUDE_PATH)
	SET( OPENGL_FOUND 1 CACHE STRING "Set to 1 if OpenGL is found, 0 otherwise")
ELSE (OPENGL_INCLUDE_PATH)
	SET( OPENGL_FOUND 0 CACHE STRING "Set to 1 if OpenGL is found, 0 otherwise")
ENDIF (OPENGL_INCLUDE_PATH)

MARK_AS_ADVANCED( FREEIMAGE_FOUND )
